package org.lionsoul.websnail.store;

/**
 * interface for todo link list
 *
 * @author chenxin<chenxin619315 @ gmail.com>
 */
public interface Todo {

	// append a new url to the todo list
	boolean add(String url);

	// append url sets to the todo list
	boolean add(String[] urls);

	// insert a new url to the head of the list
	boolean addFirst(String url);

	// add url sets to the head of the list
	boolean addFirst(String[] urls);

	// clear the whole sets
	void clear();

	/**
	 * get and remove the first url from the list
	 * and take it as the final returning value
	 */
	String shift();

	/**
	 * get and remove the last url from the list
	 * and take it as the final returning value
	 */
	String pop();

	// get the size of the todo list
	int size();

	/**
	 * close the Todo handler in case of resource leak
	 * And after this the Todo instance will not be available
	 */
	void close();
}
